package com.his.registration.service.impl;

import com.his.dto.InspectionCharge;
import com.his.dto.InspectionResult;
import com.his.registration.mapper.InspectionRequestMapper;
import com.his.registration.pojo.InspectionRequest;
import com.his.registration.service.InspectionRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @BelongsProject: workspace-idea
 * @BelongsPackage: com.his.registration.service.impl
 * @Author: ZhangYing
 * @Date: 2023/7/2 16:13
 * @Description:
 */
@Service
public class InspectionRequestServiceImpl implements InspectionRequestService {
    @Autowired
    private InspectionRequestMapper inspectionRequestMapper;
    @Override
    public List<InspectionCharge> getInspectionFee(int registerId) {
        return inspectionRequestMapper.getInspectionFee(registerId);
    }

    @Override
    public int charge(String drugState,int id) {
        return inspectionRequestMapper.charge(drugState,id);
    }

    @Override
    public int insert(int registerId, int medicalTechnologyId, LocalDateTime creationTime, String inspectionState) {
        return inspectionRequestMapper.insert(registerId,medicalTechnologyId,creationTime,inspectionState);
    }

    @Override
    public int getInsertId() {
        return inspectionRequestMapper.getInsertId();
    }

    @Override
    public int updateOthers(int id, String inspectionInfo, String inspectionPosition, String inspectionRemark) {
        return inspectionRequestMapper.updateOthers(id,inspectionInfo,inspectionPosition,inspectionRemark);
    }


    @Override
    public InspectionRequest selectById(int id) {
        return inspectionRequestMapper.selectById(id);
    }

    @Override
    public int deleteById(int id) {
        return inspectionRequestMapper.deleteById(id);
    }

    @Override
    public List<InspectionResult> getInspectionByRegisterId(int registerId) {
        return inspectionRequestMapper.getInspectionByRegisterId(registerId);
    }
}
